/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package testxml;

import java.io.File;
import java.io.IOException;
import org.apache.xmlbeans.XmlException;
import xHUAgileManufacturingAFDLSteps.PartDocument.Part;
import xHUAgileManufacturingAFDLSteps.StepDocument;

/**
 *
 * @author pascal
 */
public class TestXML
{

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws XmlException, IOException
    {
        StepDocument doc = StepDocument.Factory.parse(new File("/home/pascal/Dropbox/afstuderen-shared/2-work/AFDL/voorbeeld-v2/xml/Placekratje.xml")); //de parse() methode biedt ook varianten met streams, strings etc.
        String action = doc.getStep().getAction().getVerb();
        System.out.println("Action <"+action+"> with part names involved: ");
        Part[] partArray = doc.getStep().getAction().getPartArray();
        for (Part part : partArray)
        {
            System.out.println(part.getName());
        }
    }
}
